<?php 
	echo $html->script('jquery/jquery.maskedinput.js', false); 
?>

<script type="text/javascript">
jQuery(function($){
   $("#ConteudoDtPublicacao").mask("99/99/9999");
   $("#ConteudoDtExpiracao").mask("99/99/9999");
});
</script>

<!-- TinyMCE -->

<?php echo $html->script('tiny_mce/tiny_mce.js', true); ?>
<script type="text/javascript">
        tinyMCE.init({
                // General options
                mode : "textareas",
                theme : "advanced",
                plugins : "imagemanager,filemanager,safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template", 
                
                // Daqui em diante: Corintho
                language:"pt", 
                spellchecker_languages:"+English=en,French=fr,German=de,Italian=it,Portuguese=pt,Spanish=es", 
                dialog_type:"modal", 
                relative_urls:"", 
                remove_script_host:"", 
                convert_urls:"", 
                //apply_source_formatting:"", 
                apply_source_formatting: true,
                remove_linebreaks:"1", 
                gecko_spellcheck:"1", 
                entities:"38,amp,60,lt,62,gt", 
                accessibility_focus:"1", 
                tabfocus_elements:"major-publishing-actions", 
                media_strict:"", 
                paste_remove_styles:"1", 
                paste_remove_spans:"1", 
                paste_strip_class_attributes:"all", 
                wpeditimage_disable_captions:"", 
                
                extended_valid_elements : "iframe[src|width|height|name|align],form[name|id|action|method|enctype|accept-charset|onsubmit|onreset|target]", 

                // Theme options
                theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
                theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
                theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
                theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
                theme_advanced_toolbar_location : "top",
                theme_advanced_toolbar_align : "left",
                theme_advanced_statusbar_location : "bottom",
                theme_advanced_resizing : true

                // Example content CSS (should be your site CSS)
                //content_css : "examples/css/content.css",

                // Drop lists for link/image/media/template dialogs
                //template_external_list_url : "examples/lists/template_list.js",
                //external_link_list_url : "examples/lists/link_list.js",
                //external_image_list_url : "examples/lists/image_list.js",
                //media_external_list_url : "examples/lists/media_list.js",

                // Replace values for the template plugin
                /*template_replace_values : {
                        username : "Some User",
                        staffid : "991234"
                }*/
        });
</script>
<!-- /TinyMCE -->


<!-- inicio interna -->
<div id="titulo">
  <h1>Adicionar Nova Página</h1> <span><a href="#" onclick="javascript:history.go(-1);">&laquo; página anterior</a></span>
</div>
<?php echo $form->create('Conteudo', array('action' => 'novo', 'id' => 'formEditar')); ?>
  <fieldset id="boxinputs0">
  <?php echo $form->input('link', array( 'label' => 'Rótulo do Link:' ) );?>
  <?php echo $form->input('titulo', array( 'label' => 'Título da página:' ) );?>
  <?php echo $form->input('publicado', array('options' => array('S'=>'S','N'=>'N'), 'label' => 'Publicado', 'empty' => '(Selecione)')); ?>
  <?php echo $form->input('CD_IDIOMA', array('options' => $dadosIdioma, 'label' => 'Idioma', 'empty' => '(Selecione)')); ?>

  <?php //echo $form->input('resumo', array( 'label' => 'Resumo:', 'maxLength' => 255 ) ); ?>
  </fieldset>
  
  <br /><br />
  <div>
     <!-- Some integration calls -->
     <a href="javascript:;" onmousedown="tinyMCE.get('ConteudoConteudo').show();">[Visual]</a>
     <a href="javascript:;" onmousedown="tinyMCE.get('ConteudoConteudo').hide();">[HTML]</a>
     <!--<a href="javascript:;" onmousedown="tinyMCE.get('elm1').execCommand('Bold');">[Bold]</a>
     <a href="javascript:;" onmousedown="alert(tinyMCE.get('elm1').getContent());">[Get contents]</a>
     <a href="javascript:;" onmousedown="alert(tinyMCE.get('elm1').selection.getContent());">[Get selected HTML]</a>
     <a href="javascript:;" onmousedown="alert(tinyMCE.get('elm1').selection.getContent({format : 'text'}));">[Get selected text]</a>
     <a href="javascript:;" onmousedown="alert(tinyMCE.get('elm1').selection.getNode().nodeName);">[Get selected element]</a>
     <a href="javascript:;" onmousedown="tinyMCE.execCommand('mceInsertContent',false,'<b>Hello world!!</b>');">[Insert HTML]</a>
     <a href="javascript:;" onmousedown="tinyMCE.execCommand('mceReplaceContent',false,'<b>{$selection}</b>');">[Replace selection]</a> --></div>
  <br />
  <?=$form->input('conteudo', array( 'label' => false, 'style' => 'width:100%; height:500px; background:#eee; border:0;', 'cols' => 1, 'rows' => 5, 'class' => 'mceEditor' ) ); ?>

  <fieldset id="boxinputs2">
  <input name="nome" type="submit" value="Salvar" />
  <!--<input name="nome" type="button" value="visualizar" />-->
  </fieldset>
</form>
</div>
<!-- Fim da interna -->